package cn.iocoder.yudao.module.ent.document.node;

import cn.iocoder.yudao.module.ent.document.BaseNode;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * 最终受益人 节点
 */
@Document(indexName = "node_benefitperson")
@Data
public class NodeBenefitPerson extends BaseNode {

    //公司数据加密id
    @Field(name = "cid", type = FieldType.Keyword)
    private String cid;

    @Field(name = "create_time", type = FieldType.Text)
    private String createTime;

    @Field(name = "code", type = FieldType.Long)
    private Long code;

    //最终受益人名称
    @Field(name = "name", type = FieldType.Text)
    private String name;

    //最终受益股份
    @Field(name = "pathRatio", type = FieldType.Text)
    private String pathRatio;

    @Field(name = "pathData", type = FieldType.Nested)
    private List<PathData> pathData;

    @Data
    class PathData {

        //路径概要
        @Field(name = "pathpercent", type = FieldType.Text)
        private String pathPercent;

        @Field(name = "pathList", type = FieldType.Nested)
        private List<PathList> pathList;

        @Data
        class PathList {
            //投资公司id数据加密id
            @Field(name = "data_cid", type = FieldType.Text)
            private String dataCid;

            //投资公司
            @Field(name = "investComp", type = FieldType.Text)
            private String investComp;

            //投资占比
            @Field(name = "percent", type = FieldType.Text)
            private String percent;

        }
    }


}
